package m202406.d06;

import java.util.Scanner;

/**
 * @@author: 爱做梦的锤子
 * @date: 2024/6/6 22:44
 */
public class OD154 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int k = Integer.parseInt(scanner.nextLine());
        String[] split = scanner.nextLine().split("-");
        StringBuilder rs = new StringBuilder();
        rs.append(split[0]);
        StringBuilder sb = new StringBuilder();
        for (int i = 1; i < split.length; i++) {
            sb.append(split[i]);
        }
        int i = 0;
        for (; i < sb.length() - k; i = i + k) {
            rs.append("-");
            rs.append(convert(sb.substring(i, i + k)));
        }
        if (i < sb.length()) {
            rs.append("-");
            rs.append(convert(sb.substring(i)));
        }
        System.out.println(rs);
    }

    private static String convert(String s) {
        int lower = 0;
        int upper = 0;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (c <= 'z' && c >= 'a') {
                lower++;
            }
            if (c <= 'Z' && c >= 'A') {
                upper++;
            }
        }
        if (lower > upper) {
            return s.toLowerCase();
        }
        if (lower < upper) {
            return s.toUpperCase();
        }
        return s;
    }
}
